<!DOCTYPE html>
	<html>
	<head>
		<title>{$site_seo_title} {$site_name}</title>
		<meta name="keywords" content="{$site_seo_keywords}" />
		<meta name="description" content="{$site_seo_description}">
		<tc_include file="Public:head" />
		<link href="__TMPL__Public/css/slippry/slippry.css" rel="stylesheet">
    <style type="text/css">
    table {
        background-color: #FCFCFC !important;
        text-align: center !important;
    }
    th {
        text-align: center !important;
        padding-left:2px !important;
        padding-right:2px !important;
        padding-bottom:10px !important;
        padding-top:10px !important;
    }
    td {
	cursor: pointer;
	text-align: center !important;
	padding-left: 2px !important;
	padding-right: 2px !important;
	padding-bottom: 10px !important;
	padding-top: 10px !important;
	border-top-width: 3px !important;
	border-right-width: 3px !important;
	border-bottom-width: 3px !important;
	border-left-width: 3px !important;
	border-top-color: #D4D4D4;
	border-right-color: #D4D4D4;
	border-bottom-color: #D4D4D4;
	border-left-color: #D4D4D4;
	font-size: 12px !important;
	vertical-align: middle;
	font-family: "Times New Roman", Times, serif;
    }
	ol, ul {
		list-style: none;
	}
	hr {
	border-top-color: #CCCCCC;
	border-right-color: #CCCCCC;
	border-bottom-color: #CCCCCC;
	border-left-color: #CCCCCC;
	}
	.order-status {
		border: 1px solid #aaaaaa;
		display: block;
		overflow: hidden;
		width: 16px;
		height: 16px;
	}
	.can-order {
    	background-color:#FAFAFA;
	}
	.can-not-order {
		background-color:#B89B92;
	}
	.chosen {

		background-color:#97BAFB;
	}
	.font12px {
		font-size: 12px !important;
	}
	.echo li {
		margin: 5px 5px;
		border: 1px solid #aaaaaa;
		border-radius: 3px;
		width: 246px;
		height: 30px;
		line-height: 30px;
		font-size: 14px;
		color: #222222;
		font: inherit;
		display: list-item;
		text-align: -webkit-match-parent;
	}
	.submit-button {
	background: #4f6dcf;
	display: block;
	width: 200px;
	height: 40px;
	line-height: 40px;
	border-radius: 5px;
	color: #fff;
	text-align: center;
	border: 0;
	outline: 0;
	font-size: 14px;
	cursor: pointer;
	clear: both;
	text-decoration: none;
	font: inherit;
	margin-top: auto;
	margin-right: auto;
	margin-bottom: auto;
	margin-left: auto;
	}
    .m_form {
	background-color: #ECE6E1;
	display: block;
	vertical-align: middle;
	padding-top: 10px;
	padding-left: 20px;
	margin-top: 2px;
}
    </style>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/datepicker/datepicker.css">
	</head>
<body class="body-white">
    <tc_include file="Public:nav" />
    
<div class="container">
        <div class="row-fluid">
        	<div class="span12">
                <div class="m_form">
                
					<form action="{:U('Yd/Ydlog/index')}" method="post">
                        开始日期: <input name="start_date" type="text" class="span2" value="" id="start_date">
                        截止日期：<input name="end_date" type="text" class="span2" value="" id="end_date">
                        
                        {$select_cg}
                        <label class="" style="display:inline !important;"><input type="checkbox">只查询有效预订</label>
                  		<button id="btn_ajax_cx" class="btn btn-info" type="submit">查询</button>
					</form>
                </div>
              
            </div>
        </div><!--div class="row-fluid"-->
		<div class="row-fluid">
       	  <div class="span12">
			<table class="table table-bordered table-hover table-striped">
				<tbody>
					<tr class="">
                    	<th width="40px">
							序号
						</th>
						<th>
							操作时间
						</th>
                        <th>
                        	预约人
                        </th>
                        <th>
							场馆名称
						</th>
                        <th>
							场地名称
						</th>
						<th>
							场地时间
						</th>
                        <th>
							预订日期
						</th>
                        <th>
							操作内容
						</th>
                        <th>
							预订人
						</th>
                        <th>
							预留电话
						</th>
                        <th>
							操作人
						</th>
                        <!--th>
							操作ID
						</th-->
					</tr>
				{$show_table}
				</tbody>
			</table>
<!--**************分页框****************-->
			
			<div class="pagination">
            {$show_page}
			<!--ul class="pagination">
			  <li class="disabled">
					 <a href="#">前一页</a>
				</li>
			  <li class="active">
					 <a href="#" >1</a>
				</li>
			</ul-->
            </div>
<!--**************分页框****************-->
            </div><!--div class="span12"-->
        </div><!--div class="row-fluid"-->
</div><!--<div class="container">-->

<tc_include file="Public:footer" />
<tc_include file="Public:scripts" />

<!-- JavaScript -->
<script>
function ajax_cx(arr_data){
	$.post("{:U('Yd/YdLog/')}",{"arr":arr_data},function(ret_json_data){
		_data=decodeURIComponent(ret_json_data);
		var arr=eval('('+_data+')');	//分割json格式为数组
		//alert("count:" + arr.count + "；user_count:" + arr.user_count);
	});
}
$(function(){
	var nowTemp = new Date();
	var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
	//$('#start_date').val(nowTemp.getFullYear() + "-" + (nowTemp.getMonth()-1) + "-" + nowTemp.getDate());
	//$('#end_date').val(now.toLocaleDateString());
	$('#start_date').val('{$data.start_date}');
	$('#end_date').val('{$data.end_date}');
	var checkin = $('#start_date').datepicker({
		format: 'yyyy-mm-dd',
		todayBtn: true,
		todayHighlight: true,
		pickerPosition: "bottom-left",
		onRender: function(date) {
			//return date.valueOf() < now.valueOf() ? 'disabled' : '';
		}
	}).on('changeDate', function(ev) {
		if (ev.date.valueOf() > checkout.date.valueOf()) {
			var newDate = new Date(ev.date)
			newDate.setDate(newDate.getDate() + 1);
			checkout.setValue(newDate);
		}
		checkin.hide();
		$('#end_date')[0].focus();
	}).data('datepicker');
	
	var checkout = $('#end_date').datepicker({
		format: 'yyyy-mm-dd',
		todayHighlight: true,
		pickerPosition: "bottom-left",
		onRender: function(date) {
			return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
		}
	}).on('changeDate', function(ev) {
		checkout.hide();
	}).data('datepicker');
	
	/*$('#btn_ajax_cx').click(function(){
		var start_date = $('#start_date').val();
		var end_date = $('#end_date').val();
		var arr_data = new Array();
		arr_data[0] = start_date;
		arr_data[1] = end_date;
		ajax_cx(arr_data);
	});*/
});
</script>
<script src="__PUBLIC__/datepicker/bootstrap-datepicker.js"></script> 
	{:hook('footer_end')}
</body>
</html>